home *** CD-ROM | disk | FTP | other *** search
/ Champak 50 / Volume 50 - JOGO DISK .iso / Games / moonstonemadness.swf / scripts / __Packages / SideScroller / NegativeGround.as < prev    next >
Encoding:
Text File  |  2007-09-27  |  1006 b   |  43 lines

  1. class SideScroller.NegativeGround
  2. {
  3.    var mcRef;
  4.    var oParentObject;
  5.    var nGroundPos;
  6.    var nMinX;
  7.    var nMaxX;
  8.    static var DEFAULT_NEGATIVE_GROUND_POSITION = 600;
  9.    function NegativeGround(__mcRef, __oParentObject, __nGroundPos)
  10.    {
  11.       this.mcRef = __mcRef;
  12.       this.oParentObject = __oParentObject;
  13.       if(__nGroundPos != undefined)
  14.       {
  15.          this.nGroundPos = __nGroundPos;
  16.       }
  17.       else
  18.       {
  19.          this.nGroundPos = SideScroller.NegativeGround.DEFAULT_NEGATIVE_GROUND_POSITION;
  20.       }
  21.       this.mcRef._visible = false;
  22.       var _loc2_ = this.mcRef.getBounds(this.oParentObject.ParentLayer.Ref);
  23.       this.nMinX = _loc2_.xMin;
  24.       this.nMaxX = _loc2_.xMax;
  25.    }
  26.    function getGroundAt()
  27.    {
  28.       return this.nGroundPos;
  29.    }
  30.    function doDestroy()
  31.    {
  32.       delete this.oParentObject;
  33.    }
  34.    function get StartPos()
  35.    {
  36.       return this.nMinX;
  37.    }
  38.    function get EndPos()
  39.    {
  40.       return this.nMaxX;
  41.    }
  42. }
  43.